package com.project.harmonyledger.service;

import com.project.harmonyledger.common.response.Result;
import com.project.harmonyledger.pojo.Transaction;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface TransactionService {
        // 创建交易记录
        Result<Map<String, String>> createTransaction(Long accountId, Long categoryId,
                        BigDecimal amount, String type, String description, Date transactionDate);

        // 删除交易记录
        Result<Map<String, String>> deleteTransaction(Long transactionId);

        // 更新交易记录
        Result<Map<String, String>> updateTransaction(Long transactionId, Long categoryId,
                        BigDecimal amount, String description);

        // 获取单个交易记录详情
        Result<Map<String, String>> getTransactionById(Long transactionId);

        // 获取账户的所有交易记录
        Result<List<Transaction>> getTransactionsByAccountId(Long accountId);

        // 获取日期范围内的交易记录
        Result<List<Transaction>> getTransactionsByDateRange(Date startDate, Date endDate);

        // 获取账户统计信息
        Result<Map<String, Object>> getAccountStatistics(Long accountId, Date startDate, Date endDate);

        // 获取所有账户统计信息
        Result<Map<String, Object>> getAllAccountsStatistics(String userId, Date startDate, Date endDate);

        // 获取用户所有交易记录
        Result<List<Transaction>> getUserAllTransactions(String userId, Date startDate, Date endDate);
}